package tiger.android_hierarchy_view;

import java.util.ArrayList;
import java.util.List;

public class BrokerOrgEntity {
	private String orgName;
	private Object orgData;
	private Object parentOrgData;
	private List<BrokerOrgEntity> list;
	private int level;
	private boolean isExpand = false;
    
	public BrokerOrgEntity(){
		
	}
	public BrokerOrgEntity(String name, Object data, Object parentData) {
		this.orgData = data;
		this.orgName = name;
		this.parentOrgData = parentData;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public boolean hasChild() {
		return getList().size() != 0;
	}

	public List<BrokerOrgEntity> getList() {
		if (list == null)
			list = new ArrayList<BrokerOrgEntity>();
		return list;
	}

	public void setList(List<BrokerOrgEntity> list) {
		this.list = list;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int tier) {
		this.level = tier;
	}

	public boolean isExpand() {
		return isExpand;
	}

	public void setExpand(boolean isExpand) {
		this.isExpand = isExpand;
	}

	public Object getParentOrgData() {
		return parentOrgData;
	}

	public void setParentOrgData(Object parentOrgData) {
		this.parentOrgData = parentOrgData;
	}

	public Object getOrgData() {
		return orgData;
	}

	public void setOrgData(Object orgData) {
		this.orgData = orgData;
	}

}
